#ifndef baseOrbithpp
#define baseOrbithpp

#include "common.hpp"
#include "basePosition.hpp"

class baseOrbit : public basePosition
{
private:
	orvec orbit;
	bool kickFlag;       // TRUE if body has left the parent's SOI (should then be made a child of the parent's parent)
	bool tmpKickFlag;    // temporary kickFlag, used when the body is PREDICTED to leave the parent's SOI.
	conicPath renderOrbit;

public:
	baseOrbit();

	void virtual tick(int64_t timeStep);

	void virtual refreshDisp();

	void calcPath();

	void draw(sf::RenderWindow * window);

	/* Returns projected position/velocity at globTime = t, mu = (mu of parent body) */
	virtual stvec getTState(int64_t t);

	void setMu(double inmu); // overridden because of SOI calculations

	char getMove();

	void setOrbit(orvec inorbit);
	orvec getOrbit();
	void setState(stvec instate);

	void updateOrbit();

	virtual void setParentw(std::weak_ptr<basePosition>   inparent);
	virtual void setParents(std::shared_ptr<basePosition> inparent);
};

#endif // baseOrbithpp
